import { createRouter, createWebHistory } from 'vue-router'
import MerchantHomeView from "@/views/merchant/MerchantHomeView.vue";

const routes = [
  {
    path: '/merchant',
    name: 'merchant-home',
    component: MerchantHomeView,
    redirect:'/merchant/order',
    children:[
      {path:'/merchant/order',component:
            ()=>import('../views/merchant/order/OrderView.vue')},
      {path:'/merchant/orderEvaluation',component:
            ()=>import('../views/merchant/order/OrderEvaluationView.vue')},
      {path:'/merchant/room',component:
            ()=>import('../views/merchant/room/RoomView.vue')},
      {path:'/merchant/roomSchedule',component:
            ()=>import('../views/merchant/room/RoomScheduleView.vue')},
      {path:'/merchant/escort',component:
            ()=>import('../views/merchant/escort/EscortView.vue')},
      {path:'/merchant/escortSchedule',component:
            ()=>import('../views/merchant/escort/EscortScheduleView.vue')},
      {path:'/merchant/info',component:
            ()=>import('@/views/merchant/info/MerchantInfoView.vue')},
      {path:'/merchant/shop',component:
            ()=>import('@/views/merchant/info/ShopView.vue')},
    ]
  },
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    component: () => import('../views/LoginView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
